Transclusion of the list on another page Bản_mẫu:Danh_sách_tập_phim

When a TV series article is split into season pages, create each season's episode list on the corresponding season article. If the series also has a "List of episodes" article, do not re-create the tables in it, and instead transclude the table from the season articles to the list of episodes article.

For example, the TV series Lost has season articles for each of its seasons. An episode table is located in each of its season articles, such as Lost (season 1) and Lost (season 2). Each season is then transcluded to List of Lost episodes.

When transcluded onto any other article, the episode summaries are removed, and the background row color alternates between light and dark gray, depending on the value of |EpisodeNumber=. Occasionally, a multi-part episode will skew the pattern between odd and even numbers, to rectify this, use the |RowColor= parameter. A |RowColor=on input will color the row dark gray, like an even number normally would, on the "List of X episodes" page, while a |RowColor=off input will color the row light gray, like an odd number normally would.

For the purpose of transclusion, each sublist must make use of <onlyinclude> tags, with the opening tag just before the WikiTable, and the closing tag at the very end of the table. This prevents the lead, external links, templates, categories, interwiki links, and all other unnecessary information from being transcluded onto the main list.

When transcluding onto the main list, you should make use of {{Main}}.

Transclusion examples

On a season article, such as Lost (season 3), the code should be as follows:

<onlyinclude>{{Episode table |background=#2E5528 |overall= |season= |title= |director= |writer= |aux2= |aux2T=Featured<br />character(s) |airdate= |viewers= |country=U.S. |episodes={{Episode list/sublist|Lost (season 3)| EpisodeNumber   = 69| EpisodeNumber2  = 20| Title           = The Man Behind the Curtain| DirectedBy      = [[Bobby Roth]]| WrittenBy       = Elizabeth Sarnoff & Drew Goddard| Aux2            = [[Ben Linus|Ben]]| OriginalAirDate = {{Start date|2007|5|9}}| Viewers         = 12.11<ref name="viewers"/>| ShortSummary    = Locke meets the Others' mysterious leader Jacob.| LineColor       = 2E5528}}{{Episode list/sublist|Lost (season 3)| EpisodeNumber   = 70| EpisodeNumber2  = 21| Title           = Greatest Hits| DirectedBy      = Stephen Williams| WrittenBy       = Edward Kitsis & Adam Horowitz| Aux2            = [[Charlie Pace|Charlie]]| OriginalAirDate = {{Start date|2007|5|16}}| Viewers         = 12.32<ref name="viewers"/>| ShortSummary    = Jack learns of the Others' plan.| LineColor       = 2E5528}}}}</onlyinclude>

And similar for the other season articles of the series, such as Lost (season 4):

<onlyinclude>{{Episode table |background=#00549A |overall= |season= |title= |director= |writer= |aux2= |aux2T=Featured<br />character(s) |airdate= |viewers= |country=U.S. |episodes={{Episode list/sublist|Lost (season 4)| EpisodeNumber   = 73| EpisodeNumber2  = 1| Title           = The Beginning of the End| DirectedBy      = [[Jack Bender]]| WrittenBy       = [[Damon Lindelof]] & [[Carlton Cuse]]| Aux2            = [[Hugo "Hurley" Reyes|Hurley]]| OriginalAirDate = {{Start date|2008|1|31}}| Viewers         = 17.77<ref name="rankings"/>| ShortSummary    = The survivors of 815 split into two groups led by Jack and Locke.| LineColor       = 00549A| RowColor        = on}}{{Episode list/sublist|Lost (season 4)| EpisodeNumber   = 74| EpisodeNumber2  = 2| Title           = Confirmed Dead| DirectedBy      = [[Stephen Williams (director)|Stephen Williams]]| WrittenBy       = [[Drew Goddard]] & [[Brian K. Vaughan]]| Aux2            = [[Daniel Faraday|Faraday]]| OriginalAirDate = {{Start date|2008|2|7}}| Viewers         = 16.96<ref name="rankings"/>| ShortSummary    = A science team from the freighter arrives on the island.| LineColor       = 00549A| RowColor        = off}}|}</onlyinclude>

The following code should appear on List of Lost episodes:

== Season 1 =={{Main|Lost (season 1)}}{{:Lost (season 1)}}<!-- To edit the episodes in this section, you need to edit the article listed above. -->== Season 2 =={{main|Lost (season 2)}}{{:Lost (season 2)}}<!-- To edit the episodes in this section, you need to edit the article listed above. -->

Note the colon (:) at the beginning of the transclusions; this is necessary when transcluding an article. If you tried to transclude Lost (season 1), without using the colon, you would get Template:Lost (season 1), a redlink to a nonexistent template.

The above code will appear as follows:

Season 3
Bài chi tiết: Lost (season 3)
TT.
tổng thể
TT. trong
mùa phim
Tiêu đềĐạo diễnBiên kịchFeatured
character(s)
Ngày phát hành gốcNgười xem tại U.S.
(triệu)
6920"The Man Behind the Curtain"Bobby RothElizabeth Sarnoff & Drew GoddardBen9 tháng 5 năm 2007 (2007-05-09)12.11[1]
7021"Greatest Hits"Stephen WilliamsEdward Kitsis & Adam HorowitzCharlie16 tháng 5 năm 2007 (2007-05-16)12.32[1]
Season 4
Bài chi tiết: Lost (season 4)
TT.
tổng thể
TT. trong
mùa phim
Tiêu đềĐạo diễnBiên kịchFeatured
character(s)
Ngày phát hành gốcNgười xem tại U.S.
(triệu)
731"The Beginning of the End"Jack BenderDamon Lindelof & Carlton CuseHurley31 tháng 1 năm 2008 (2008-01-31)17.77[2]
742"Confirmed Dead"Stephen WilliamsDrew Goddard & Brian K. VaughanFaraday7 tháng 2 năm 2008 (2008-02-07)16.96[2]

Tips

It may be helpful to include a hidden message that will appear when someone edits the article. Placed above the table headers and under the article section, such as:

==Episodes==<!-- For help with this template see http://en.wikipedia.org/wiki/Template:Episode_list --><onlyinclude>{{Episode table

This message won't be visible when normally viewing the article. A message such as this notes where one can get help for the template.